<?php
class ControllerUploadDelProduct extends Controller {
	private $error = array();
	public function index()
	{
		//-------------------------------------------------------------------------//
		// Check login
		//-------------------------------------------------------------------------//
		if (!$this->customer->isLogged()) {
			$this->session->data['redirect'] = $this->url->https('upload/edit_product');
			$this->redirect($this->url->https('account/login'));
		}
		//-------------------------------------------------------------------------//
		// get product id from parameter
		//-------------------------------------------------------------------------//
		if(isset($this->request->post["product_id"]) == false){
			$this->redirect($this->url->http('common/home'));
		}

		$product_id = $this->request->post["product_id"];
		$this->data["product_id"] = $product_id;
		//-------------------------------------------------------------------------//
		// load module
		//-------------------------------------------------------------------------//
		$this->language->load('common/header');
		$this->language->load('common/home');
		$this->load->model('product/select');
		$this->load->model('upload/shop');
		$this->load->model('upload/product');

		$catalog_arr = $this->model_upload_product->getParentCategories();

		$this->data['action'] = $this->url->http('upload/product/delete');
	}
}
?>